Write into module?

Hi,

how can i write into a module column?

I have a code to get out the "Linkset" and i want to write this into a module column (only if the row has a link)

For example

Module

ID Name Link Linkset
1 Test1

<

>

Project1/Test1 -> Project1/Test2
2 Test2   -
3 Test3 > Project1/Test3 -> Project1/Test1

 

Code:

Project p = current 
string slash = "/"
string nameP = name(p)
string x = slash nameP
string proPath = x

void getLink(string folder_path)
{
    Folder f = folder folder_path                   
    Item it                                                                 
    Module m                                
    LinkModuleDescriptor lmd 
    
    if ( null f )                                                   
    { 
        return -1
    }
    else
    {
        for it in f do                                          
        {     
            if ( isDeleted it )                             
            {
                continue
            }
            if ( type(it)=="Folder" || type(it)=="Project")             
            {
                getLink(fullName it)                                                
            }
        }
        for lmd in f do
        {
            print "Link: "getSourceName(lmd) "->" 
            print getTargetName(lmd) "\n"
            print "Linkmodul: "getName(lmd) "\n"
            print "________________________\n" 
        }
    }
}
getLink(proPath)

 


meinhana - Thu Dec 10 04:19:03 EST 2015

Re: Write into module?
DoorsXLAustralia - Thu Dec 10 07:44:21 EST 2015

Not sure I understand the context of what you are trying to achieve but try looking in the DXL manual for Layout DXL or Attribute DXL

For these solutions you don't need a recursive function like the one you have written.

Sean

Re: Write into module?
meinhana - Thu Dec 10 08:51:27 EST 2015

DoorsXLAustralia - Thu Dec 10 07:44:21 EST 2015

Not sure I understand the context of what you are trying to achieve but try looking in the DXL manual for Layout DXL or Attribute DXL

For these solutions you don't need a recursive function like the one you have written.

Sean

Hi,

i want to insert column into a module.

In this column should be the "linkset" ( Project1/Module1 -> Project1/Module2) ...

But first i need to know how to create a new column and how to write in this column

And then i want to search which row have a link

 

My code print this -> "Project1/Module1 -> Project1/Module2"

Maybe i don't need a recursive function, but i wrote this because i thought i need this :P

 

Sorry for my bad english

 

Re: Write into module?
DoorsXLAustralia - Thu Dec 10 10:45:22 EST 2015

Try looking in the DXL manual for Layout DXL or Attribute DXL

That should be what you are looking for

Sean

Re: Write into module?
Costas..Aravidis - Tue Dec 15 08:37:21 EST 2015

You can use the Analysis Wizard to create the code. You do not really need to do that manually. Then have a look at the code in the layout dxl and improve it.

Costas